package com.hunt.controller;

import com.hunt.model.dto.*;
import com.hunt.model.entity.AddressInfo;
import com.hunt.service.ManagementService;
import com.hunt.service.SystemService;
import com.hunt.util.ResponseCode;
import com.hunt.util.Result;
import com.hunt.util.StringUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
/**
 * @Author x
 * @Date 2023/04/25
 * @Description
 */
@Api(value = "在线时间统计")
@Controller
@RequestMapping("useronlinetime")
public class UserOnlineTimeController extends BaseController {
    private ManagementService managementService;

    @ApiOperation(value = "跳转至在线时间统计模块", httpMethod = "GET", produces = "text/html")
    @RequestMapping(value = "useronlinepage", method = RequestMethod.GET)
    public String useronlinepage() {
        return "system/useronlinepage";
    }

    @ApiOperation(value = "在线时间", httpMethod = "GET")
    @RequestMapping(value = "useronlineget", method = RequestMethod.GET)
    @ResponseBody
    public PageInfo useronlineget(@RequestParam(defaultValue = "1") int page,
                                @RequestParam(defaultValue = "30") int rows) {
        PageInfo pageInfo = managementService.selectAccountPage(page,rows,null,null,null,null,null,null,null,null);
        return pageInfo;
    }


}
